<template>
    <el-table-column :label="col.name" :prop="col.code">
        <template v-if="col.hasChildren">
            <my-column v-for="(item, index) in col.children" :col="item" :key="index" :label="item.name" :prop="item.code"></my-column>
        </template>
    </el-table-column>
</template>

<script>
export default {
    name: "MyColumn",
    props: {
        col: {
            type: Object
        }
    }
}
</script>